﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminProducts.aspx.cs" Inherits="EHTSaleManager.UIAdmin.AdminProducts" %>

<%@ Register Src="~/UIAdmin/Control/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <asp:Label ID="lbAdminProduct" runat="server" Text="Produkt Leder"></asp:Label>
    </h1>
    <table cellspacing="0" cellpadding="0" class="data-table">
        <tr>
            <td align="right">
                <asp:Label ID="lbParent" runat="server">Kategorier : </asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlCategory" Width="200" runat="server" CssClass="textEntry" 
                    AutoPostBack="true" onselectedindexchanged="ddlCategory_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td></td>
            <td></td>
            <td>
                
        
        <asp:Button ID="btnAdd" runat="server" CommandName="Login" Text="Legg Produkt"
            OnClick="btnAdd_Click" />
   

 
       &nbsp;
        <asp:Button ID="btnExport" runat="server" CommandName="Login" Text="Eksport" onclick="btnExport_Click"
           />
        &nbsp;
        <asp:Button ID="btnImport" runat="server" CommandName="Login" Text="Import" onclick="btnImport_Click"
           />

            </td>
        </tr>
    </table>
    <asp:Repeater ID="rpProducts" runat="server">
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table">
                <thead>
                    <tr>
                        <th class="actions edit">
                            Edit
                        </th>
                        <th class="actions delete">
                            Slett
                        </th>
                        <th>
                           Produktnavn
                        </th>
                        <th>
                            Antall per enhet
                        </th>
                        <th>
                            Pris
                        </th>
                        <th>
                            På lager
                        </th>
                        <th>
                            Rabatt
                        </th>
                        <th>
                            Bilde
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td class="actions edit">
                    <a href='AdminProduct.aspx?ProductID=<%#Eval("ProductID")%>'>
                        <img alt="Edit" src="/Styles/Edit.png"></a>
                </td>
                <td class="actions delete">
                    <a href='AdminProductComfirmDelete.aspx?ProductID=<%#Eval("ProductID")%>'>
                        <img alt="Delete" src="/Styles/Delete.png"></a>
                </td>
                <th>
                    <%#Eval("ProductName") %>
                </th>
                <td>
                    <%#Eval("QuantityPerUnit") %>
                </td>
                <td>
                    <%#Eval("Price") %>
                </td>
                <td>
                    <%#Eval("UnitsInStock") %>
                </td>
                <td>
                    <%#Eval("Discount") %>
                </td>
                <td>
                    <asp:Image ID="ImagProduct" Width="60" Height="50" ImageUrl='<%#Eval("PictureUrl")%>'
                        runat="server" />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody> </table>
        </FooterTemplate>
    </asp:Repeater>
    <p>
        <EHT:PaggingControl ID="PaggingControl1" runat="server" PageURL="AdminProducts.aspx"
            PageSize="30" />
    </p>
   
</asp:Content>
